#! /bin/sh
#### Shoot rays (Figure 14)
#------------------------------------------------
# RUN THIS SHELL WITH MASTER SHELL PSdemo
#------------------------------------------------


datadir=../../datadir/
modelfile=${datadir}model.data
rayendsfile=${datadir}rayends.data
rayfile=${datadir}rays.data

nangle=130 fangle=-65 langle=65 nxz=201 x=1.5

####   shoot the rays
triray <$modelfile >$rayendsfile xs=1.5 zs=0 \
	rayfile=$rayfile krecord=1 nxz=$nxz \
       	nangle=130 fangle=-65 langle=65 \
        refseq=2,1 refseq=1,-1 

psgraph <$rayfile nplot=`cat outpar` n=$nxz hbox=4 wbox=6 \
        x1beg=0 x1end=2 x2beg=-1.0 x2end=5 style=seismic \
        label1="Depth (km)" label2="Distance (km)" title="Raypaths" \
	|$PSPREVIEWER

exit 0
